import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import router from "./router";
import pinia from "./store";
// src\main.ts
import i18n from "./locales";
import "virtual:svg-icons-register";
import "element-plus/dist/index.css";
// import { initLangListener } from "@/locales";

const app = createApp(App);
// 配置路由
app.use(router);
// 配置pinia
app.use(pinia);
// 配置国际化
app.use(i18n);

app.mount("#app").$nextTick(() => {
  // Use contextBridge
  window.ipcRenderer.on("main-process-message", (_event, message) => {
    console.log(message);
  });
  postMessage({ payload: "removeLoading" }, "*");
  // 初始化多语言切换监听
  //  initLangListener();
});
